<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<%
    request.setCharacterEncoding("UTF-8");
    String htmlData = request.getParameter("content1") != null ? request.getParameter("content1") : "";
%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/StudentsListExamSubject.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/argeeCommon.jsp" %>
<%@ include file="/WEB-INF/JSP/backHome/modalWindows/againstAuditCommon.jsp" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
    <script type="text/javascript" src="<%=path%>/My97DatePicker/WdatePicker.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/backLayout.css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bombBox.css">
</head>
<style>
    select {
        width: 234px;
        height: 31px
    }

    .gn_name {
        padding-top: 5px
    }

    .div_zilei {
        width: 100%;
        height: 30px
    }

    .tr {
        height: 40px;
        background: #57a0ff;
        font-weight:700;
    }

    .tr td {
        font-size: 14px;
        color: #ffffff
    }

    .tr_td {
        height: 40px;
    }

   .tr_td td {
        border-bottom: 1px solid #ededed;
        text-align: center;
    } 

    tr td:nth-child(1) {
        font-size: 14px;
        color: #cccccc
    }

    .date {
        border: 0;
        background: #ffffff;
        text-align: center;
    }

    .tr_td td:nth-child(1) {
        border-left: 1px solid #cccccc;
    }

    .tr_td td:nth-child(3) {
        border-right: 1px solid #cccccc;
    }

    .addTable.deleteTable:HOVER {
        cursor: pointer;
    }

    type[type='checkbox'] {
        width: 15px
    }
    .addSubscribeStudent{
        background-color: #57a0ff;
        height: 35px;
        width: 130px;
        color: #ffffff;
        border: 0;
        margin-top: 20px;
        border-radius: 15px;
        padding: 5px;
        -moz-border-radius: 5px;
        outline: none;
        margin-right: 50px;
        cursor:pointer;
    }
</style>
<body style="background: #f5f5f5">
<div class="main">
    <div id="modal-overlay">

    </div>
    <div class="weizhi">
        <c:if test="${subjectThreeReg.cfbillstate eq 3}">
            考试管理>>科目三考试登记>>修改
        </c:if>
        <c:if test="${subjectThreeReg.cfbillstate eq 4 || subjectThreeReg.cfbillstate eq 5}">
            考试管理>>科目三考试登记>>查看
        </c:if>
    </div>
    <div class="div_body" style="box-shadow: 0 0 5px #cccccc;height: 1150px">
		
		<c:if test="${subjectThreeReg.cfbillstate eq 3}">
			<div class="div_form">
            <form id="update_subjectThreeReg" action="<%=path%>/DrivingSys/updateSubjectThreeReg" method="post" class="form" onsubmit="return subForm()">
                	<input type="hidden" name="fid" value="${subjectThreeReg.fid }">
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                        <input type="text" name="name" value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                        <input type="text" class="fnumber" name="fnumber" value="${subjectThreeReg.fnumber}" style="color: gray;" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">考试日期&nbsp;:&nbsp;</span>
                        <input type="text" name="fbizdate" id="ywrq" value="${subjectThreeReg.fbizdate }"
                               onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})" onchange="changeFbizdate($(this))"/>
                         <input type="hidden" id="subjectType" value="4">
                        <img onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})"
                             src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                    </div>
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                        <input name="fdescription" value="${subjectThreeReg.fdescription }"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                        <select name="cfbillstate" >
                            <option id="shenhe" style="color: gray;" value="3">保存</option>
                        </select>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">车型&nbsp;:&nbsp;</span>
                        <select class="cfcartype" name="cfcartype"  onchange="changeCartype()">
                        	<option value="${subjectThreeReg.cfcartype }">${subjectThreeReg.cfcartype }</option>
                        	<option value="A1">A1</option>
                        	<option value="A2">A2</option>
                        	<option value="A3">A3</option>
                        	<option value="B1">B1</option>
                        	<option value="B2">B2</option>
                        	<option value="C1">C1</option>
                        	<option value="C2">C2</option>
                        	<option value="C3">C3</option>
                        	<option value="C4">C4</option>
                        	<option value="D">D</option>
                        	<option value="E">E</option>
                        	<option value="F">F</option>
                        	<option value="M">M</option>
                        	<option value="N">N</option>                       	
                        	<option value="P">P</option>
                        </select>                      
                    </div>
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">指标数(伊兰特)&nbsp;:&nbsp;</span>
                        <input id="cfzbsylt" name="cfzbsylt" value="${subjectThreeReg.cfzbsylt }" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">指标数(桑塔纳)&nbsp;:&nbsp;</span>
                        <input id="cfbimudf0001" name="cfbimudf0001" value="${subjectThreeReg.cfbimudf0001 }" readonly="readonly"/>
                    </div> 
                    <div class="input_hang">
                        <span class="gn_name">总指标数&nbsp;:&nbsp;</span>
                        <input id="cfzzbs" name="cfzzbs" value="${subjectThreeReg.cfzzbs }" readonly="readonly"/>
                    </div>                    
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        
                    </div>
                    <div class="input_hang">

                    </div> 
                    <div class="input_hang">
                        <span class="gn_name">总报考数&nbsp;:&nbsp;</span>
                        <input id="cfzbks" name="cfzbks" value="${subjectThreeReg.cfzbks }" readonly="readonly"/>
                    </div>                    
                </div>
                <div style="margin-left: 90px;">确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" class="addSubscribeStudent"  value="添加预约学员" /></div>
                <div class="div_zilei">
                    <div style="width: 93%;text-align: right;">
                        <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                        <span style="padding-right: 20px;color:#57a0ff;font-weight:700;font-size: 14px" class="addTable">添加</span>
                        <img src="<%=path%>/image/delete212.png" class="deleteTable">
                        <span class="deleteTable" style="color:#57a0ff;font-weight:700;font-size: 14px" class="deleteTable">删除</span>
                    </div>
                </div>
                <div style="overflow:auto;/* min-height: 200px; */width: 88%; height:250px;margin-left: 90px">
                    <table id="table1" style="min-height:50px;border-spacing:0;width: 160%;white-space:nowrap;">
                        <tr  class="tr">
                        	<td><%--<input type="checkbox" class="check1">--%></td>
                            <td class="fseq">序号</td>
                            <td style="width: 90px;" align="center">准考证明编号</td>
                            <td style="width: 90px;" align="center">学员姓名</td>
                            <td style="width: 90px;" align="center">学员编码</td>
                            <td style="width: 90px;" align="center">科目二编号</td>
                            <td style="width: 90px;" align="center">科目三编号</td>
                            <td style="width: 90px;" align="center">身份证号</td>
                            <td style="width: 90px;" align="center">性别</td>
                            <td style="width: 90px;" align="center">手机号码</td>
                            <td style="width: 90px;" align="center">电话</td>
                            <td style="width: 90px;" align="center">推荐人</td>
                            <td style="width: 90px;" align="center">申请准驾车型代号</td>
                            <td style="width: 90px;" align="center">教练</td>
                            <td style="width: 90px;" align="center">车牌</td>
                            <td style="width: 90px;" align="center">车型</td>
                            <td style="width: 90px;" align="center">本地/异地</td>
                            <td style="width: 90px;" align="center">考试次数</td>
                            <td style="width: 90px;" align="center">初考/补考</td>
                            <td style="width: 90px;" align="center">交补考费次数</td>
                            <td style="width: 90px;" align="center">交补考费总额</td>
                            <td style="width: 90px;" align="center">本校/外校</td>
                            <td style="width: 90px;" align="center">科目一及格时间</td>
                            <td style="width: 90px;" align="center">科目二合格时间</td>
                            <td style="width: 90px;" align="center">科目三不及格时间</td>
                            <td style="width: 90px;" align="center">班级</td>
                            <td style="width: 90px;" align="center">已收</td>
                            <td style="width: 90px;" align="center">优惠</td>
                            <td style="width: 90px;" align="center">应收</td>
                            <td style="width: 90px;" align="center">欠费</td>
                            <td style="width: 90px;" align="center">备注</td>
                            <td style="width: 90px;" align="center">档案交接</td>
                            <td style="width: 90px;" align="center">技能表交接</td>                        
                        </tr>
                        <c:forEach items="${subjectThreeReg.subjectThreeRegentryList }" var ="subjectThreeRegentry">
									<tr class="tr_td">
										<td><input type="checkbox" name="checkchilden"
											value="${subjectThreeRegentry.cfstudentid}"></td>
										<td><input type="text" class="fseq" name="subfseq"
											value="${subjectThreeRegentry.fseq}" readonly="readonly"> <input type="hidden"
											class="subfid" name="subfid" value="${subjectThreeRegentry.cfstudentid}"
											readonly="readonly"> 
										</td>
										<td align="center"><input class="cfzkzmbh"
											style="width: 90px;" type="text" name="subcfzkzmbh"
											value="${subjectThreeRegentry.cfzkzmbh}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subfnameL2" value="${subjectThreeRegentry.studentName}"
											class="clickName is_click_ne" readonly="readonly"/></td>
										<td align="center"><input style="width: 170px;"
											type="text" name="substufnumber" value="${subjectThreeRegentry.cfstudentno}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfnumber" value="${subjectThreeRegentry.cfnumber}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfkmsbh" value="${subjectThreeRegentry.cfkmsbh}" readonly="readonly"/></td>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfidcardno" value="${subjectThreeRegentry.cfidcardno}" readonly="readonly"/></td>
										<c:if test="${subjectThreeRegentry.cfsex eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfsex" value="男" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfsex eq 2 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfsex" value="女" readonly="readonly"/></td>
										</c:if>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfsjhm" value="${subjectThreeRegentry.cfmobile}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcflxdh" value="${subjectThreeRegentry.cfphone}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcftjrName" value="${subjectThreeRegentry.cfrjr}" readonly="readonly" /></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfsqzjcxdh" value="${subjectThreeRegentry.cfsqcx}"></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subjlname" value="${subjectThreeRegentry.jlzname}" readonly="readonly"/> <input
											type="hidden" name="subcfjiaolianid" value="${subjectThreeRegentry.cfjiaolianid}" readonly="readonly">
										</td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfchepai" value="${subjectThreeRegentry.cfchepa}" readonly="readonly"></td>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfchexing" value="${subjectThreeRegentry.cfchexing}" readonly="readonly">
											<input type="hidden" name="subcfchepaihao"
											value="${subjectThreeRegentry.cfchepa}"></td>
										<c:if test="${subjectThreeRegentry. cfbdyd eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcflocal" value="本地" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry. cfbdyd eq 2 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcflocal" value="异地"  readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry. cfbdyd eq 3 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcflocal" value="学生" readonly="readonly"/></td>
										</c:if>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfkscs" value="${subjectThreeRegentry.cfkscs}" /></td>
										<c:if test="${subjectThreeRegentry.cfckbk eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfckbk" value="初考" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfckbk eq 2 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfckbk" value="补考" readonly="readonly"/></td>
										</c:if>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfbkfcs" value="${subjectThreeRegentry.cfbkfcs}" readonly="readonly"></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfbkfze" value="${subjectThreeRegentry.cfbkfze}" readonly="readonly"></td>
										<c:if test="${subjectThreeRegentry.cfbxwx eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfbxwx" value="本校" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfbxwx eq 2 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfbxwx" value="外校" readonly="readonly"/></td>
										</c:if>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfkmyjgsj" value="${subjectThreeRegentry.cfkmyjgsj}" readonly="readonly"/></td>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfkmehgsj" value="${subjectThreeRegentry.cfkmehgsj}" readonly="readonly"/></td>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfkmsbjgsj" value="${subjectThreeRegentry.cfbjgsj}" readonly="readonly"/></td>
										<td align="center"><input style="width: 150px;"
											type="text" name="subcfclazz" value="${subjectThreeRegentry.cfclazz}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfysje" value="${subjectThreeRegentry.cfysje}" readonly="readonly"/></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfyhje" value="${subjectThreeRegentry.cfyhje}" readonly="readonly"></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfyisje" value="${subjectThreeRegentry.cfyisje}" readonly="readonly"></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfqfje" value="${subjectThreeRegentry.cfqfje }" readonly="readonly"></td>
										<td align="center"><input style="width: 150px;"
											type="text" name="subcfremark" value="${subjectThreeRegentry.cfremark}" /></td>
										<c:if test="${subjectThreeRegentry.cfdajj eq 0 }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" disabled="disabled" readonly="readonly"
												name="subcfdajj" value="0" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfdajj eq null }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" disabled="disabled" readonly="readonly"
												name="subcfdajj" value="0" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfdajj eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" checked="checked" disabled="disabled"
												readonly="readonly" name="subcfdajj" value="1" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfjnbjj eq 0 }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" disabled="disabled" readonly="readonly"
												name="subcfjnbjj" value="0" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfjnbjj eq null }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" disabled="disabled" readonly="readonly"
												name="subcfjnbjj" value="0" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfjnbjj eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" checked="checked" disabled="disabled"
												readonly="readonly" name="subcfjnbjj" value="1" /></td>
										</c:if>
									</tr>
								</c:forEach>
                    </table>
                </div>

                <div style="margin-top: 10px; margin-left: 90px;">已退学员</div>
                <div class="div_zilei">
                    <%--<div style="width: 88%;text-align: right;">
                        <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                        <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                        <img src="<%=path%>/image/delete212.png" class="deleteTable">
                        <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                    </div>--%>
                </div>
                <div style="overflow:auto;min-height: 200px;width: 88%;margin-left: 90px">
                    <table id="table2" style="min-height:50px;border-spacing:0;width: 160%;white-space:nowrap;">
                      
                            <tr  class="tr">
                        	<td><%--<input type="checkbox">--%></td>
                            <td class="fseq">序号</td>
                            <td style="width: 90px;" align="center">准考证明编号</td>
                            <td style="width: 90px;" align="center">学员姓名</td>
                            <td style="width: 90px;" align="center">学员编码</td>
                            <td style="width: 90px;" align="center">科目二编号</td>
                            <td style="width: 90px;" align="center">科目三编号</td>
                            <td style="width: 90px;" align="center">身份证号</td>
                            <td style="width: 90px;" align="center">性别</td>
                            <td style="width: 90px;" align="center">手机号码</td>
                            <td style="width: 90px;" align="center">电话</td>
                            <td style="width: 90px;" align="center">推荐人</td>
                            <td style="width: 90px;" align="center">申请准驾车型代号</td>
                            <td style="width: 90px;" align="center">教练</td>
                            <td style="width: 90px;" align="center">车牌</td>
                            <td style="width: 90px;" align="center">车型</td>
                            <td style="width: 90px;" align="center">本地/异地</td>
                            <td style="width: 90px;" align="center">考试次数</td>
                            <td style="width: 90px;" align="center">初考/补考</td>
                            <td style="width: 90px;" align="center">交补考费次数</td>
                            <td style="width: 90px;" align="center">交补考费总额</td>
                            <td style="width: 90px;" align="center">本校/外校</td>
                            <td style="width: 90px;" align="center">科目一及格时间</td>
                            <td style="width: 90px;" align="center">科目二合格时间</td>
                            <td style="width: 90px;" align="center">科目三不及格时间</td>
                            <td style="width: 90px;" align="center">班级</td>
                            <td style="width: 90px;" align="center">已收</td>
                            <td style="width: 90px;" align="center">优惠</td>
                            <td style="width: 90px;" align="center">应收</td>
                            <td style="width: 90px;" align="center">欠费</td>
                            <td style="width: 90px;" align="center">备注</td>
                            <td style="width: 90px;" align="center">档案交接</td>
                            <td style="width: 90px;" align="center">技能表交接</td>                      
                        </tr>
                    </table>
                </div>
				<div class="div_input_hang">
                    
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                        <input readonly="readonly" name="checkName"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                        <input  readonly="readonly" name="createName" value="${subjectThreeReg.createName }"/>
                        
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                        <input name="fcreatetime"  style="color: gray;" readonly="readonly" value="${subjectThreeReg.fcreatetime }"/>
                    </div>
                </div>

                <div class="div_tj" style="padding-top: 0px">
                    <shiro:hasPermission name="/sureSubjectThreeReg">
                        <div>
                            <input class="input_submit bc" value="" type="submit">
                        </div>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="/submitSubjectThreeReg">
                        <div>
                            <input type="button" class="input_submit tj" value="" onclick="audit(4)"/>
                        </div>
                    </shiro:hasPermission>
                    <div>
                        <input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('${activitiBPMN_KEY}',$('.fnumber').val())">
                    </div>
                    <div>
                        <input type="button" class="input_back fh" value="" onclick="back()"/>
                    </div>
                </div>
            </form>
        </div>
		</c:if>

        <c:if test="${subjectThreeReg.cfbillstate eq 4}">
            <div class="div_form">
                <form id="update_subjectThreeReg" action="<%=path%>/DrivingSys/updateSubjectThreeReg" method="post" class="form">
                    <input type="hidden" name="fid" value="${subjectThreeReg.fid }">
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                            <input type="text" name="name" value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                            <input class="fnumber" type="text" name="fnumber" value="${subjectThreeReg.fnumber}" style="color: gray;" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">考试日期&nbsp;:&nbsp;</span>
                            <input type="text" name="fbizdate" id="ywrq" value="${subjectThreeReg.fbizdate }"
                                   onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})" readonly="readonly"/>
                            <input type="hidden" id="subjectType" value="4">
                            <img onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})"
                                 src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                        </div>
                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                            <input name="fdescription" value="${subjectThreeReg.fdescription }" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                            <select name="cfbillstate" >
                                <option id="shenhe" style="color: gray;" value="4">提交</option>
                            </select>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">车型&nbsp;:&nbsp;</span>
                            <select class="cfcartype" name="cfcartype" disabled="disabled">
                                <option value="${subjectThreeReg.cfcartype }">${subjectThreeReg.cfcartype }</option>
                                <option value="A1">A1</option>
                                <option value="A2">A2</option>
                                <option value="A3">A3</option>
                                <option value="B1">B1</option>
                                <option value="B2">B2</option>
                                <option value="C1">C1</option>
                                <option value="C2">C2</option>
                                <option value="C3">C3</option>
                                <option value="C4">C4</option>
                                <option value="D">D</option>
                                <option value="E">E</option>
                                <option value="F">F</option>
                                <option value="M">M</option>
                                <option value="N">N</option>
                                <option value="P">P</option>
                            </select>
                        </div>
                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">指标数(伊兰特)&nbsp;:&nbsp;</span>
                            <input id="cfzbsylt" name="cfzbsylt" value="${subjectThreeReg.cfzbsylt }" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">指标数(桑塔纳)&nbsp;:&nbsp;</span>
                            <input id="cfbimudf0001" name="cfbimudf0001" value="${subjectThreeReg.cfbimudf0001 }" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">总指标数&nbsp;:&nbsp;</span>
                            <input id="cfzzbs" name="cfzzbs" value="${subjectThreeReg.cfzzbs }" readonly="readonly"/>
                        </div>
                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">

                        </div>
                        <div class="input_hang">

                        </div>
                        <div class="input_hang">
                            <span class="gn_name">总报考数&nbsp;:&nbsp;</span>
                            <input id="cfzbks" name="cfzbks" value="${subjectThreeReg.cfzbks }" readonly="readonly"/>
                        </div>
                    </div>
                    <div style="margin-left: 90px;">确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;<%--<span><a class="addSubscribeStudent" href="#">添加预约学员</a></span>--%></div>
                    <div class="div_zilei">
                        <%--<div style="width: 88%;text-align: right;">
                            <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                            <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                            <img src="<%=path%>/image/delete212.png" class="deleteTable">
                            <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                        </div>--%>
                    </div>
                    <div style="overflow:auto;/* min-height: 200px; */width: 88%; height:250px;margin-left: 90px">
                        <table id="table1" style="min-height:50px;border-spacing:0;width: 160%;white-space:nowrap;">
                            <tr  class="tr">
                                <td><%--<input type="checkbox" class="check1">--%></td>
                                <td class="fseq">序号</td>
                                <td style="width: 90px;" align="center">准考证明编号</td>
                                <td style="width: 90px;" align="center">学员姓名</td>
                                <td style="width: 90px;" align="center">学员编码</td>
                                <td style="width: 90px;" align="center">科目二编号</td>
                                <td style="width: 90px;" align="center">科目三编号</td>
                                <td style="width: 90px;" align="center">身份证号</td>
                                <td style="width: 90px;" align="center">性别</td>
                                <td style="width: 90px;" align="center">手机号码</td>
                                <td style="width: 90px;" align="center">电话</td>
                                <td style="width: 90px;" align="center">推荐人</td>
                                <td style="width: 90px;" align="center">申请准驾车型代号</td>
                                <td style="width: 90px;" align="center">教练</td>
                                <td style="width: 90px;" align="center">车牌</td>
                                <td style="width: 90px;" align="center">车型</td>
                                <td style="width: 90px;" align="center">本地/异地</td>
                                <td style="width: 90px;" align="center">考试次数</td>
                                <td style="width: 90px;" align="center">初考/补考</td>
                                <td style="width: 90px;" align="center">交补考费次数</td>
                                <td style="width: 90px;" align="center">交补考费总额</td>
                                <td style="width: 90px;" align="center">本校/外校</td>
                                <td style="width: 90px;" align="center">科目一及格时间</td>
                                <td style="width: 90px;" align="center">科目二合格时间</td>
                                <td style="width: 90px;" align="center">科目三不及格时间</td>
                                <td style="width: 90px;" align="center">班级</td>
                                <td style="width: 90px;" align="center">已收</td>
                                <td style="width: 90px;" align="center">优惠</td>
                                <td style="width: 90px;" align="center">应收</td>
                                <td style="width: 90px;" align="center">欠费</td>
                                <td style="width: 90px;" align="center">备注</td>
                                <td style="width: 90px;" align="center">档案交接</td>
                                <td style="width: 90px;" align="center">技能表交接</td>
                            </tr>
                            <c:forEach items="${subjectThreeReg.subjectThreeRegentryList }" var ="subjectThreeRegentry">
                                <tr class="tr_td">
                                    <td><input type="checkbox" name="checkchilden"
                                               value="${subjectThreeRegentry.cfstudentid}" readonly="readonly"/></td>
                                    <td><input type="text" class="fseq" name="subfseq"
                                               value="${subjectThreeRegentry.fseq}" readonly="readonly"> <input type="hidden"
                                                                                                                class="subfid" name="subfid" value="${subjectThreeRegentry.cfstudentid}"
                                                                                                                readonly="readonly">
                                    </td>
                                    <td align="center"><input class="cfzkzmbh"
                                                              style="width: 90px;" type="text" name="subcfzkzmbh"
                                                              value="${subjectThreeRegentry.cfzkzmbh}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subfnameL2" value="${subjectThreeRegentry.studentName}"
                                                               readonly="readonly"/></td>
                                    <td align="center"><input style="width: 170px;"
                                                              type="text" name="substufnumber" value="${subjectThreeRegentry.cfstudentno}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfnumber" value="${subjectThreeRegentry.cfnumber}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfkmsbh" value="${subjectThreeRegentry.cfkmsbh}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 140px;"
                                                              type="text" name="subcfidcardno" value="${subjectThreeRegentry.cfidcardno}" readonly="readonly"/></td>
                                    <c:if test="${subjectThreeRegentry.cfsex eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfsex" value="男" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry.cfsex eq 2 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfsex" value="女" readonly="readonly"/></td>
                                    </c:if>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfsjhm" value="${subjectThreeRegentry.cfmobile}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcflxdh" value="${subjectThreeRegentry.cfphone}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcftjrName" value="${subjectThreeRegentry.cfrjr}" readonly="readonly"/></td>
                                    <td align="center"><input type="text"
                                                              style="width: 90px;" name="subcfsqzjcxdh" value="${subjectThreeRegentry.cfsqcx}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subjlname" value="${subjectThreeRegentry.jlzname}" readonly="readonly"/> <input
                                            type="hidden" name="subcfjiaolianid" value="${subjectThreeRegentry.cfjiaolianid}" readonly="readonly"/>
                                    </td>
                                    <td align="center"><input type="text"
                                                              style="width: 90px;" name="subcfchepai" value="${subjectThreeRegentry.cfchepa}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 140px;"
                                                              type="text" name="subcfchexing" value="${subjectThreeRegentry.cfchexing}" readonly="readonly"/>
                                        <input type="hidden" name="subcfchepaihao"
                                               value="${subjectThreeRegentry.cfchepa}"></td>
                                    <c:if test="${subjectThreeRegentry. cfbdyd eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcflocal" value="本地" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry. cfbdyd eq 2 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcflocal" value="异地" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry. cfbdyd eq 3 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcflocal" value="学生" readonly="readonly"/></td>
                                    </c:if>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfkscs" value="${subjectThreeRegentry.cfkscs}" readonly="readonly"/></td>
                                    <c:if test="${subjectThreeRegentry.cfckbk eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfckbk" value="初考" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry.cfckbk eq 2 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfckbk" value="补考" readonly="readonly"/></td>
                                    </c:if>
                                    <td align="center"><input type="text"
                                                              style="width: 90px;" name="subcfbkfcs" value="${subjectThreeRegentry.cfbkfcs}" readonly="readonly"/></td>
                                    <td align="center"><input type="text"
                                                              style="width: 90px;" name="subcfbkfze" value="${subjectThreeRegentry.cfbkfze}" readonly="readonly"/></td>
                                    <c:if test="${subjectThreeRegentry.cfbxwx eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfbxwx" value="本校" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry.cfbxwx eq 2 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="text" name="subcfbxwx" value="外校" readonly="readonly"/></td>
                                    </c:if>
                                    <td align="center"><input style="width: 140px;"
                                                              type="text" name="subcfkmyjgsj" value="${subjectThreeRegentry.cfkmyjgsj}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 140px;"
                                                              type="text" name="subcfkmehgsj" value="${subjectThreeRegentry.cfkmehgsj}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 140px;"
                                                              type="text" name="subcfkmsbjgsj" value="${subjectThreeRegentry.cfbjgsj}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 150px;"
                                                              type="text" name="subcfclazz" value="${subjectThreeRegentry.cfclazz}" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 90px;"
                                                              type="text" name="subcfysje" value="${subjectThreeRegentry.cfysje}" readonly="readonly"/></td>
                                    <td align="center"><input type="text"
                                                              style="width: 90px;" name="subcfyhje" value="${subjectThreeRegentry.cfyhje}" readonly="readonly"/></td>
                                    <td align="center"><input type="text"
                                                              style="width: 90px;" name="subcfyisje" value="${subjectThreeRegentry.cfyisje}" readonly="readonly"/></td>
                                    <td align="center"><input type="text"
                                                              style="width: 90px;" name="subcfqfje" value="${subjectThreeRegentry.cfqfje }" readonly="readonly"/></td>
                                    <td align="center"><input style="width: 150px;"
                                                              type="text" name="subcfremark" value="${subjectThreeRegentry.cfremark}" readonly="readonly"/></td>
                                    <c:if test="${subjectThreeRegentry.cfdajj eq 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled" readonly="readonly"
                                                                  name="subcfdajj" value="0" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry.cfdajj eq null }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled" readonly="readonly"
                                                                  name="subcfdajj" value="0" readonly="readonly"/></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry.cfdajj eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" checked="checked" disabled="disabled"
                                                                  readonly="readonly" name="subcfdajj" value="1" /></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry.cfjnbjj eq 0 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled" readonly="readonly"
                                                                  name="subcfjnbjj" value="0" /></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry.cfjnbjj eq null }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" disabled="disabled" readonly="readonly"
                                                                  name="subcfjnbjj" value="0" /></td>
                                    </c:if>
                                    <c:if test="${subjectThreeRegentry.cfjnbjj eq 1 }">
                                        <td align="center"><input style="width: 90px;"
                                                                  type="checkbox" checked="checked" disabled="disabled"
                                                                  readonly="readonly" name="subcfjnbjj" value="1" /></td>
                                    </c:if>
                                </tr>
                            </c:forEach>
                        </table>
                    </div>

                    <div style="margin-top: 10px; margin-left: 90px;">已退学员</div>
                    <div class="div_zilei">
                            <%--<div style="width: 88%;text-align: right;">
                                <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                                <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                                <img src="<%=path%>/image/delete212.png" class="deleteTable">
                                <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                            </div>--%>
                    </div>
                    <div style="overflow:auto;min-height: 200px;width: 88%;margin-left: 90px">
                        <table id="table2" style="min-height:50px;border-spacing:0;width: 160%;white-space:nowrap;">

                            <tr  class="tr">
                                <td><%--<input type="checkbox">--%></td>
                                <td class="fseq">序号</td>
                                <td style="width: 90px;" align="center">准考证明编号</td>
                                <td style="width: 90px;" align="center">学员姓名</td>
                                <td style="width: 90px;" align="center">学员编码</td>
                                <td style="width: 90px;" align="center">科目二编号</td>
                                <td style="width: 90px;" align="center">科目三编号</td>
                                <td style="width: 90px;" align="center">身份证号</td>
                                <td style="width: 90px;" align="center">性别</td>
                                <td style="width: 90px;" align="center">手机号码</td>
                                <td style="width: 90px;" align="center">电话</td>
                                <td style="width: 90px;" align="center">推荐人</td>
                                <td style="width: 90px;" align="center">申请准驾车型代号</td>
                                <td style="width: 90px;" align="center">教练</td>
                                <td style="width: 90px;" align="center">车牌</td>
                                <td style="width: 90px;" align="center">车型</td>
                                <td style="width: 90px;" align="center">本地/异地</td>
                                <td style="width: 90px;" align="center">考试次数</td>
                                <td style="width: 90px;" align="center">初考/补考</td>
                                <td style="width: 90px;" align="center">交补考费次数</td>
                                <td style="width: 90px;" align="center">交补考费总额</td>
                                <td style="width: 90px;" align="center">本校/外校</td>
                                <td style="width: 90px;" align="center">科目一及格时间</td>
                                <td style="width: 90px;" align="center">科目二合格时间</td>
                                <td style="width: 90px;" align="center">科目三不及格时间</td>
                                <td style="width: 90px;" align="center">班级</td>
                                <td style="width: 90px;" align="center">已收</td>
                                <td style="width: 90px;" align="center">优惠</td>
                                <td style="width: 90px;" align="center">应收</td>
                                <td style="width: 90px;" align="center">欠费</td>
                                <td style="width: 90px;" align="center">备注</td>
                                <td style="width: 90px;" align="center">档案交接</td>
                                <td style="width: 90px;" align="center">技能表交接</td>
                            </tr>
                        </table>
                    </div>
                    <div class="div_input_hang">

                    </div>
                    <div class="div_input_hang">
                        <div class="input_hang">
                            <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                            <input readonly="readonly" name="checkName" readonly="readonly"/>
                        </div>
                        <div class="input_hang">
                            <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                            <input  readonly="readonly" name="createName" value="${subjectThreeReg.createName }" readonly="readonly"/>

                        </div>
                        <div class="input_hang">
                            <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                            <input name="fcreatetime"  style="color: gray;" readonly="readonly" value="${subjectThreeReg.fcreatetime }" />
                        </div>
                    </div>

                    <div class="div_tj" style="padding-top: 0px">
                        <shiro:hasPermission name="/auditSubjectThreeReg">
                            <c:if test="${activitiState eq 'power'}">
                                <div>
                                    <input class="input_submit sh" value="" type="button" onclick="audit(5)">
                                </div>
                            </c:if>
                        </shiro:hasPermission>
                        <shiro:hasPermission name="/againstAuditSubjectThreeReg">
                            <div>
                                <input  class="input_submit fsh" value="" type="button" onclick="audit(3)">
                            </div>
                        </shiro:hasPermission>
                        <div>
                            <input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('${activitiBPMN_KEY}',$('.fnumber').val())">
                        </div>
                        <div>
                            <input type="button" class="input_back fh" value="" onclick="back()"/>
                        </div>
                    </div>
                </form>
            </div>
        </c:if>
		
		<c:if test="${subjectThreeReg.cfbillstate eq 5}">
        <div class="div_form">
            <form action="<%=path%>/DrivingSys/updateSubjectThreeReg" method="post" class="form">
                <input type="hidden" name="fid" value="${subjectThreeReg.fid }">
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">驾校&nbsp;:&nbsp;</span>
                        <input type="text" name="name" value="${department.fnameL2}" readonly="readonly" style="color: gray;"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据编号&nbsp;:&nbsp;</span>
                        <input disabled="disabled" class="fnumber" type="text" name="fnumber" value="${subjectThreeReg.fnumber}" style="color: gray;" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">考试日期&nbsp;:&nbsp;</span>
                        <input disabled="disabled" type="text" name="fbizdate" id="ywrq" value="${subjectThreeReg.fbizdate }"
                               onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})" readonly="readonly"/>
                         <input type="hidden" id="subjectType" value="4">
                        <img onclick="WdatePicker({el:'ywrq',dateFmt:'yyyy-MM-dd'})"
                             src="<%=path%>/image/date.jpg" align="absmiddle" style="padding-left: 15px">
                    </div>
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">参考信息&nbsp;:&nbsp;</span>
                        <input disabled="disabled" name="fdescription" value="${subjectThreeReg.fdescription }" readonly="readonly"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">单据状态&nbsp;:&nbsp;</span>
                        <select  name="cfbillstate" >
                            <option class="shenhe" style="color: gray;" value="5">审核</option>
                        </select>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">车型&nbsp;:&nbsp;</span>
                        <select disabled="disabled" class="cfcartype" name="cfcartype">
                        	<option value="${subjectThreeReg.cfcartype }">${subjectThreeReg.cfcartype }</option>
                        	<option value="A1">A1</option>
                        	<option value="A2">A2</option>
                        	<option value="A3">A3</option>
                        	<option value="B1">B1</option>
                        	<option value="B2">B2</option>
                        	<option value="C1">C1</option>
                        	<option value="C2">C2</option>
                        	<option value="C3">C3</option>
                        	<option value="C4">C4</option>
                        	<option value="D">D</option>
                        	<option value="E">E</option>
                        	<option value="F">F</option>
                        	<option value="M">M</option>
                        	<option value="N">N</option>                       	
                        	<option value="P">P</option>
                        </select>                      
                    </div>
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">指标数(伊兰特)&nbsp;:&nbsp;</span>
                        <input id="cfzbsylt" name="cfzbsylt"  readonly="readonly" value="${subjectThreeReg.cfzbsylt }"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">指标数(桑塔纳)&nbsp;:&nbsp;</span>
                        <input disabled="disabled" id="cfbimudf0001" name="cfzbsstn" readonly="readonly" value="${subjectThreeReg.cfbimudf0001 }"/>
                    </div> 
                    <div class="input_hang">
                        <span class="gn_name">总指标数&nbsp;:&nbsp;</span>
                        <input  id="cfzzbs" disabled="disabled" name="cfzzbs" readonly="readonly" value="${subjectThreeReg.cfzzbs }"/>
                    </div>                    
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        
                    </div>
                    <div class="input_hang">
                        
                    </div> 
                    <div class="input_hang">
                        <span class="gn_name">总报考数&nbsp;:&nbsp;</span>
                        <input disabled="disabled" id="cfzbks" name="cfzbks" value="${subjetThreeReg.cfzbks }" readonly="readonly"/>
                    </div>                    
                </div>
                <div style="margin-left: 90px;">确认报考学员&nbsp;&nbsp;&nbsp;&nbsp;<%--<span><a class="addSubscribeStudent" href="#">添加预约学员</a></span>--%></div>
                <div class="div_zilei">
                    <%--<div style="width: 88%;text-align: right;">
                        <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                        <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                        <img src="<%=path%>/image/delete212.png" class="deleteTable">
                        <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                    </div>--%>
                </div>
                <div style="overflow:auto;/* min-height: 200px; */width: 88%; height:250px;margin-left: 90px">
                    <table id="table1" style="min-height:50px;border-spacing:0;width:160%;white-space:nowrap;">
                        <tr  class="tr">
                        	<td><%--<input type="checkbox" class="check1">--%></td>
                            <td class="fseq">序号</td>
                            <td style="width: 90px;" align="center">准考证明编号</td>
                            <td style="width: 90px;" align="center">学员姓名</td>
                            <td style="width: 90px;" align="center">学员编码</td>
                            <td style="width: 90px;" align="center">科目二编号</td>
                            <td style="width: 90px;" align="center">科目三编号</td>
                            <td style="width: 90px;" align="center">身份证号</td>
                            <td style="width: 90px;" align="center">性别</td>
                            <td style="width: 90px;" align="center">手机号码</td>
                            <td style="width: 90px;" align="center">电话</td>
                            <td style="width: 90px;" align="center">推荐人</td>
                            <td style="width: 90px;" align="center">申请准驾车型代号</td>
                            <td style="width: 90px;" align="center">教练</td>
                            <td style="width: 90px;" align="center">车牌</td>
                            <td style="width: 90px;" align="center">车型</td>
                            <td style="width: 90px;" align="center">本地/异地</td>
                            <td style="width: 90px;" align="center">考试次数</td>
                            <td style="width: 90px;" align="center">初考/补考</td>
                            <td style="width: 90px;" align="center">交补考费次数</td>
                            <td style="width: 90px;" align="center">交补考费总额</td>
                            <td style="width: 90px;" align="center">本校/外校</td>
                            <td style="width: 90px;" align="center">科目一及格时间</td>
                            <td style="width: 90px;" align="center">科目二合格时间</td>
                            <td style="width: 90px;" align="center">科目三不及格时间</td>
                            <td style="width: 90px;" align="center">班级</td>
                            <td style="width: 90px;" align="center">已收</td>
                            <td style="width: 90px;" align="center">优惠</td>
                            <td style="width: 90px;" align="center">应收</td>
                            <td style="width: 90px;" align="center">欠费</td>
                            <td style="width: 90px;" align="center">备注</td>
                            <td style="width: 90px;" align="center">档案交接</td>
                            <td style="width: 90px;" align="center">技能表交接</td>                        
                        </tr>
                         <c:forEach items="${subjectThreeReg.subjectThreeRegentryList }" var ="subjectThreeRegentry">
									<tr class="tr_td">
										<td><input type="checkbox" name="checkchilden"
											value="${subjectThreeRegentry.cfstudentid}" readonly="readonly"/></td>
										<td><input type="text" class="fseq" name="subfseq"
											value="${subjectThreeRegentry.fseq}" readonly="readonly"> <input type="hidden"
											class="subfid" name="subfid" value="${subjectThreeRegentry.cfstudentid}"
											readonly="readonly"> 
										</td>
										<td align="center"><input class="cfzkzmbh"
											style="width: 90px;" type="text" name="subcfzkzmbh"
											value="${subjectThreeRegentry.cfzkzmbh}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subfnameL2" value="${subjectThreeRegentry.studentName}" readonly="readonly" /></td>
										<td align="center"><input style="width: 170px;"
											type="text" name="substufnumber" value="${subjectThreeRegentry.cfstudentno}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfnumber" value="${subjectThreeRegentry.cfnumber}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfkmsbh" value="${subjectThreeRegentry.cfkmsbh}" readonly="readonly"/></td>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfidcardno" value="${subjectThreeRegentry.cfidcardno}" /></td>
										<c:if test="${subjectThreeRegentry.cfsex eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfsex" value="男" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfsex eq 2 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfsex" value="女" readonly="readonly"/></td>
										</c:if>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfsjhm" value="${subjectThreeRegentry.cfmobile}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcflxdh" value="${subjectThreeRegentry.cfphone}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcftjrName" value="${subjectThreeRegentry.cfrjr}" readonly="readonly"/></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfsqzjcxdh" value="${subjectThreeRegentry.cfsqcx}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subjlname" value="${subjectThreeRegentry.jlzname}" /> <input
											type="hidden" name="subcfjiaolianid" value="${subjectThreeRegentry.cfjiaolianid}">
										</td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfchepai" value="${subjectThreeRegentry.cfchepa}" readonly="readonly"/></td>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfchexing" value="${subjectThreeRegentry.cfchexing}" readonly="readonly"/>
											<input type="hidden" name="subcfchepaihao"
											value="${subjectThreeRegentry.cfchepa}" readonly="readonly"/></td>
										<c:if test="${subjectThreeRegentry. cfbdyd eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcflocal" value="本地" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry. cfbdyd eq 2 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcflocal" value="异地" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry. cfbdyd eq 3 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcflocal" value="学生" readonly="readonly"/></td>
										</c:if>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfkscs" value="${subjectThreeRegentry.cfkscs}" /></td>
										<c:if test="${subjectThreeRegentry.cfckbk eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfckbk" value="初考" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfckbk eq 2 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfckbk" value="补考" readonly="readonly"/></td>
										</c:if>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfbkfcs" value="${subjectThreeRegentry.cfbkfcs}" readonly="readonly"/></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfbkfze" value="${subjectThreeRegentry.cfbkfze}" readonly="readonly"/></td>
										<c:if test="${subjectThreeRegentry.cfbxwx eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfbxwx" value="本校" readonly="readonly"/></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfbxwx eq 2 }">
											<td align="center"><input style="width: 90px;"
												type="text" name="subcfbxwx" value="外校" readonly="readonly"/></td>
										</c:if>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfkmyjgsj" value="${subjectThreeRegentry.cfkmyjgsj}" readonly="readonly"/></td>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfkmehgsj" value="${subjectThreeRegentry.cfkmehgsj}" readonly="readonly"/></td>
										<td align="center"><input style="width: 140px;"
											type="text" name="subcfkmsbjgsj" value="${subjectThreeRegentry.cfbjgsj}" readonly="readonly"/></td>
										<td align="center"><input style="width: 150px;"
											type="text" name="subcfclazz" value="${subjectThreeRegentry.cfclazz}" readonly="readonly"/></td>
										<td align="center"><input style="width: 90px;"
											type="text" name="subcfysje" value="${subjectThreeRegentry.cfysje}" readonly="readonly"/></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfyhje" value="${subjectThreeRegentry.cfyhje}" readonly="readonly"/></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfyije" value="${subjectThreeRegentry.cfyisje}" readonly="readonly"/></td>
										<td align="center"><input type="text"
											style="width: 90px;" name="subcfqfje" value="${subjectThreeRegentry.cfqfje}" readonly="readonly"/></td>
										<td align="center"><input style="width: 150px;"
											type="text" name="subcfremark" value="${subjectThreeRegentry.cfremark}" readonly="readonly"/></td>
										<c:if test="${subjectThreeRegentry.cfdajj eq 0 }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" disabled="disabled" readonly="readonly"
												name="subcfdajj" value="0" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfdajj eq null }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" disabled="disabled" readonly="readonly"
												name="subcfdajj" value="0" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfdajj eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" checked="checked" disabled="disabled"
												readonly="readonly" name="subcfdajj" value="1" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfjnbjj eq 0 }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" disabled="disabled" readonly="readonly"
												name="subcfjnbjj" value="0" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfjnbjj eq null }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" disabled="disabled" readonly="readonly"
												name="subcfjnbjj" value="0" /></td>
										</c:if>
										<c:if test="${subjectThreeRegentry.cfjnbjj eq 1 }">
											<td align="center"><input style="width: 90px;"
												type="checkbox" checked="checked" disabled="disabled"
												readonly="readonly" name="subcfjnbjj" value="1" /></td>
										</c:if>
									</tr>
								</c:forEach>
                    </table>
                </div>

                <div style="margin-top: 10px; margin-left: 90px;">已退学员</div>
                <div class="div_zilei">
                   <%-- <div style="width: 88%;text-align: right;">
                        <img src="<%=path%>/image/insert2323.jpg" class="addTable">
                        <span style="padding-right: 20px;color: #a9bbe0;font-size: 14px" class="addTable">添加</span>
                        <img src="<%=path%>/image/delete212.png" class="deleteTable">
                        <span class="deleteTable" style="color: #a9bbe0;font-size: 14px" class="deleteTable">删除</span>
                    </div>--%>
                </div>
                <div style="overflow:auto;min-height: 200px;width: 88%;margin-left: 90px">
                    <table id="table2" style="min-height:50px;border-spacing:0;width: 160%;white-space:nowrap;">
                            <tr  class="tr">
                        	<td><%--<input type="checkbox">--%></td>
                            <td class="fseq">序号</td>
                            <td style="width: 90px;" align="center">准考证明编号</td>
                            <td style="width: 90px;" align="center">学员姓名</td>
                            <td style="width: 90px;" align="center">学员编码</td>
                            <td style="width: 90px;" align="center">科目二编号</td>
                            <td style="width: 90px;" align="center">科目三编号</td>
                            <td style="width: 90px;" align="center">身份证号</td>
                            <td style="width: 90px;" align="center">性别</td>
                            <td style="width: 90px;" align="center">手机号码</td>
                            <td style="width: 90px;" align="center">电话</td>
                            <td style="width: 90px;" align="center">推荐人</td>
                            <td style="width: 90px;" align="center">申请准驾车型代号</td>
                            <td style="width: 90px;" align="center">教练</td>
                            <td style="width: 90px;" align="center">车牌</td>
                            <td style="width: 90px;" align="center">车型</td>
                            <td style="width: 90px;" align="center">本地/异地</td>
                            <td style="width: 90px;" align="center">考试次数</td>
                            <td style="width: 90px;" align="center">初考/补考</td>
                            <td style="width: 90px;" align="center">交补考费次数</td>
                            <td style="width: 90px;" align="center">交补考费总额</td>
                            <td style="width: 90px;" align="center">本校/外校</td>
                            <td style="width: 90px;" align="center">科目一及格时间</td>
                            <td style="width: 90px;" align="center">科目二合格时间</td>
                            <td style="width: 90px;" align="center">科目三不及格时间</td>
                            <td style="width: 90px;" align="center">班级</td>
                            <td style="width: 90px;" align="center">已收</td>
                            <td style="width: 90px;" align="center">优惠</td>
                            <td style="width: 90px;" align="center">应收</td>
                            <td style="width: 90px;" align="center">欠费</td>
                            <td style="width: 90px;" align="center">备注</td>
                            <td style="width: 90px;" align="center">档案交接</td>
                            <td style="width: 90px;" align="center">技能表交接</td>                      
                        </tr>   
                       

                    </table>
                </div>
				<div class="div_input_hang">
                    
                </div>
                <div class="div_input_hang">
                    <div class="input_hang">
                        <span class="gn_name">审核人&nbsp;:&nbsp;</span>
                        <input  disabled="disabled" readonly="readonly" name="checkName" value="${subjectThreeReg.checkName }"/>
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">创建者&nbsp;:&nbsp;</span>
                        <input disabled="disabled" readonly="readonly" name="createName" value="${subjectThreeReg.createName }"/>
                        
                    </div>
                    <div class="input_hang">
                        <span class="gn_name">创建时间&nbsp;:&nbsp;</span>
                        <input disabled="disabled" name="fcreatetime"  style="color: gray;" readonly="readonly" value="${subjectThreeReg.fcreatetime }"/>
                    </div>
                </div>

                <div class="div_tj" style="padding-top: 0px">
                    <shiro:hasPermission name="/againstAuditSubjectThreeReg">
                        <div>
                            <input type="button" class="input_submit fsh" value="" onclick="audit(3)"/>
                        </div>
                    </shiro:hasPermission>
                    <div>
                        <input type="button" class="input_submit cklc" value="" onclick="lookActivitiImg('${activitiBPMN_KEY}',$('.fnumber').val())">
                    </div>
                    <div>
                        <input type="button" class="input_back fh" value="" onclick="back()"/>
                    </div>
                </div>
            </form>
        </div>
        </c:if>
        <%--保存流程查询的结果--%>
        <%--有正在进行的流程--%>
        <c:if test="${activitiState eq 'power' || activitiState eq 'noAssign'}">
            <input type="hidden" class="activitiState" value="1">
        </c:if>
        <%--没有进行的流程--%>
        <c:if test="${activitiState eq 'noTask' || activitiState eq 'finish' || activitiState eq 'failed'}">
            <input type="hidden" class="activitiState" value="2">
        </c:if>
    </div>
</div>
</body>
<script type="text/javascript" src="<%=path%>/JQuery/jquery-1.8.2.js"></script>
<%@ include file="/WEB-INF/JSP/ajax.jsp" %>
<script type="text/javascript" src="<%=path%>/HoganJS/handlebars-v4.0.11.js"></script>
<script id="table-template1-sub" type="text/x-handlebars-template"></script> 

<script id="table-template2-sub" type="text/x-handlebars-template">
    {{#each this}}
	<tr class="tr_td">
		<td><input type="checkbox" name="checkchilden" value="{{cfstudentid}}"></td>
 		<td><input type="text" class="fseq" name="subfseq" value="" readonly="readonly">
			<input type="hidden" class="subfid" name="subfid" value="{{cfstudentid}}" readonly="readonly">
			<input type="hidden" class="subcfclazzid" name="subcfclazzid" value="{{cfclazzid}}" readonly="readonly">
		</td>       
        <td align="center"><input class="cfzkzmbh" style="width: 90px;" type="text" name="subcfzkzmbh" value="{{cfzkzmbh}}" readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subfnameL2" value="{{studentName}}" class="clickName is_click_ne" readonly="readonly"/></td>
        <td align="center"><input style="width: 170px;" type="text" name="substufnumber" value="{{cfstudentno}}" readonly="readonly"/></td>
		<td align="center"><input style="width: 90px;" type="text" name="subcfnumber" value="{{cfnumber}}" readonly="readonly"/></td>
		<td align="center"><input style="width: 90px;" type="text" name="subcfkmsbh" value="{{cfkmsbh}}" readonly="readonly"/></td>
		<td align="center"><input style="width: 140px;" type="text" name="subcfidcardno" value="{{cfidcardno}}" readonly="readonly"/></td>
		{{#compare cfsex 1}}
			<td align="center"><input style="width: 90px;" type="text" name="subcfsex" value="男" readonly="readonly"/></td>
		 {{else}}
        	<td align="center"><input style="width: 90px;" type="text" name="subcfsex" value="女" readonly="readonly"/></td>
		{{/compare}}        
        <td align="center"><input style="width: 90px;" type="text" name="subcfsjhm" value="{{cfmobile}}" readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcflxdh" value="{{cfphone}}" readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcftjrName" value="{{cfrjr}}" readonly="readonly"/>
		</td>
		<td align="center"><input type="text" style="width: 90px;" name="subcfsqzjcxdh" value="{{cfsqcx}}" readonly="readonly"></td>
        <td align="center"><input style="width: 90px;" type="text" name="subjlname" value="{{jlzname}}" readonly="readonly"/>
		<input type="hidden" name="subcfjiaolianid" value="{{cfjiaolianid}}">
		</td>
		<td align="center"><input type="text" style="width: 90px;" name="subcfchepai" value="{{cfchepa}}" readonly="readonly"></td>
		<td align="center"><input style="width: 140px;" type="text" name="subcfchexing" value="{{cfchexing}}" readonly="readonly">
			<input type="hidden" name="subcfchepaihao" value="{{cfchepa}}">
		</td>
		{{#compare cfbdyd 1}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="本地" readonly="readonly"/></td>
		{{/compare}}
		{{#compare cfbdyd 2}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="异地" readonly="readonly"/></td>
		{{/compare}}
		{{#compare cfbdyd 3}}
        <td align="center"><input style="width: 90px;" type="text" name="subcflocal" value="学生" readonly="readonly"/></td>
		{{/compare}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfkscs" value="{{cfkscs}}" readonly="readonly"/></td>
		{{#compare cfckbk 1}}
			<td align="center"><input style="width: 90px;" type="text" name="subcfckbk" value="初考" readonly="readonly"/></td>
		{{else}}
        	<td align="center"><input style="width: 90px;" type="text" name="subcfckbk" value="补考" readonly="readonly"/></td>
		{{/compare}}
		<td align="center"><input type="text" style="width: 90px;" name="subcfbkfcs" value="{{cfbkfcs}}" readonly="readonly"></td>
		<td align="center"><input type="text" style="width: 90px;" name="subcfbkfze" value="{{cfbkfze}}" readonly="readonly"></td>
		{{#compare cfbxwx 1}}
        <td align="center"><input style="width: 90px;" type="text" name="subcfbxwx" value="本校" readonly="readonly"/></td>
		{{else}}
		 <td align="center"><input style="width: 90px;" type="text" name="subcfbxwx" value="外校"/></td>
		{{/compare}}
        <td align="center"><input style="width: 140px;" type="text" name="subcfkmyjgsj" value="{{cfkmyjgsj}}" readonly="readonly"/></td>
        <td align="center"><input style="width: 140px;" type="text" name="subcfkmehgsj" value="{{cfkmehgsj}}" readonly="readonly"/></td>
        <td align="center"><input style="width: 140px;" type="text" name="subcfkmsbjgsj" value="{{cfbjgsj}}" readonly="readonly"/></td>
		<td align="center"><input style="width: 150px;" type="text" name="subcfclazz" value="{{cfclazz}}" readonly="readonly"/></td>
        <td align="center"><input style="width: 90px;" type="text" name="subcfysje" value="{{cfysje}}" readonly="readonly"/></td>
		<td align="center"><input type="text" style="width: 90px;" name="subcfyhje" value="{{cfyhje}}" readonly="readonly"></td>
		<td align="center"><input type="text" style="width: 90px;" name="subcfyisje" value="{{cfyisje}}" readonly="readonly"></td>
        <td align="center"><input type="text" style="width: 90px;" name="subcfqfje" value="{{cfqfje}}" readonly="readonly"></td>
        <td align="center"><input style="width: 150px;" type="text" name="subcfremark" value="{{cfremark}}"/></td>
		{{#compare cfdajj 0}}
        	<td align="center"><input style="width: 90px;" type="checkbox"  disabled="disabled" readonly="readonly" name="subcfdajj" value="0"/></td>
		{{/compare}}
		{{#compare cfdajj null}}
        	<td align="center"><input style="width: 90px;" type="checkbox"  disabled="disabled" readonly="readonly" name="subcfdajj" value="0"/></td>
		{{/compare}}
		{{#compare cfdajj 1}}
			<td align="center"><input style="width: 90px;" type="checkbox" checked="checked" disabled="disabled" readonly="readonly" name="subcfdajj" value="1"/></td>
		{{/compare}}
		{{#compare cfjnbjj 0}}
        	<td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly" name="subcfjnbjj" value="0"/></td>
		{{/compare}}
		{{#compare cfjnbjj null}}
        	<td align="center"><input style="width: 90px;" type="checkbox" disabled="disabled" readonly="readonly" name="subcfjnbjj" value="0"/></td>
		{{/compare}}
		{{#compare cfjnbjj 1}} 
			<td align="center"><input style="width: 90px;" type="checkbox" checked="checked" disabled="disabled" readonly="readonly" name="subcfjnbjj" value="1"/></td>
		{{/compare}}       
    </tr>
	{{/each}}
</script>
<script type="text/javascript">
/* $(document).ready(function (){
	$(".fseq").each(function(i){
		alert(i)
		$(this).val(i+1);
	})
}) */
    var _this=null;//修改时保存this缓存
    var yltcar=$("#cfzbsylt").val();//伊兰特车的数量
    yltcar=Number(yltcar)
    var stncar=$("#cfbimudf0001").val();//桑塔纳车的数量
    stncar=Number(stncar)
    var sum = $("#cfzzbs").val();//总指标的人数
    sum=Number(sum)
	//注册一个比较大小的Helper,判断v1是否大于v2
	Handlebars.registerHelper("compare", function (v1, v2, options) {
   	 	if (v1 == v2) {
       	 	//满足添加继续执行
        	return options.fn(this);
    	} else {
        	//不满足条件执行{{else}}部分
        	return options.inverse(this);
    	}
	});

  	//填充值的模板
    var myTemplate2 = Handlebars.compile($("#table-template2-sub").html());

    //删除一行
    $(".deleteTable").click(function () { 
    	var k=0;//记录被选中复选框的个数
    	var falg=$("input:checkbox[name=checkchilden]:checked").each(function (i){
    		k++;
    	})
    	if(k == 0){
    		alert("请勾选中需要删除的行！")
    	}else{
    		k=0;//记录数清零
    		$("input:checkbox[name=checkchilden]:checked").each(function (i){
        		$(this).parent().parent().remove();
        		k++;//记录删除的条数
        		if($(this).parent().parent().find("td").eq("15").children("input").val() == '伊兰特BH7162MY'){
        			yltcar-=1;	
        		}else{
        			stncar-=1;
        		}
        		$("#cfzbsylt").val(yltcar)
                $("#cfbimudf0001").val(stncar)
        	})
        	//序列号
        	var i=1;
        	$("input:text[name=subfseq]").each(function (j){ 		
            	$(this).val(i);
            	i++
            })
            sum-=k;
        	$("#cfzzbs").val(sum)
            $("#cfzbks").val(sum) 
        	$(".check1").removeAttr("checked");
    	}
    	
    })
    
	//选中需要考试的学员
    $('.addTable').click(function () {
    	var examdate=$("#ywrq").val();
    	if(examdate == null || examdate == ''){
    		alert("请选择考试日期！")
    		$("#ywrq").focus()
    	}else{
    		getPagExamSub()
    		$('#table1').html($('#table1').html());
       	    $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data').css('visibility', 'visible')
            //$(".check1 input:checkbox").removeAttr("checked");
            //$('.page').show();
            //$('#index').val(1)
    	}
         
    })
    //查找符合预约过科目三考试的学员
    function getPagExamSub(){
    	var examdate=$("#ywrq").val().trim()//考试日期
    	var carType=$(".cfcartype").val();
    	var subjectType=$("#subjectType").val();
        myname = $('.name1').val();
        cflxdh = $('.cflxdh').val();
        $('#studebntList').html("<div class='loading'></div>");
        $.ajax({
            url: '<%=path2%>/DrivingSys/getPagExamSub?pindex=0&name=' + myname + '&cflxdh=' + cflxdh + '&beginTime=' + beginTime.val() + '&endTime=' + endTime.val()+'&examdate='+examdate+'&carType='+carType+'&subjectType='+subjectType,
            type: "get",
            dataType: "json",
            success: function (res) {
                $('#studebntList').html(myTemplate(res));
                $('#totalPage').val(res.pb);
            },
            error: function () {
                alert('Error');
            }
        });        
    }


    /* 关闭弹出框    */
    $('.btn').click(function () {
        $('#modal-overlay').css('visibility', 'hidden')
        $('.modal-data1').css('visibility', 'hidden')
        $('.modal-data').css('visibility', 'hidden')
        $('.modal-data9').css('visibility', 'hidden')
        $('.modal-data10').css('visibility', 'hidden')
        $('.head1 input:checkbox').removeAttr('checked');
        $('.page').hide();
        var i=1;
		$("input:text[name=subfseq]").each(function (j){ 		
			$(this).val(i);                	
			i++
		}) 
		_this=null;//清空 _this
    })


  /* //设置全选功选 
	$('.check').live('click',function(){	
		alert("hh")
		if($(this).attr("checked")){
			 $('input:checkbox[name=checkchilden]').attr("checked",":checked") 
		}else{			
			 $('input:checkbox[name=checkchilden]').removeAttr('checked');
		}
	}) */

	 //设置全选功选 
$('.check1').live('click',function(){
	if($(this).attr("checked")){
			$("input:checkbox[name=checkchilden]").prop("checked",true) 
	}else{
		$('input:checkbox[name=checkchilden]').removeAttr('checked')
	}
})

   //由于和input:checkbox冲突，在选择一次
 $("#table1 tr td input:checkbox:not(.check1)").live('click',function(){
	  if($(this).is(':checked')){
	    	$(this).removeAttr("checked");
	    }else{
	    	$(this).attr("checked",":checked")
	    } 
 }) 
  //单击选中
  $("#table1 tr td").live('click',function(){
    if($(this).parent().find("input:checkbox[name=checkchilden]").is(':checked')){
    	$(this).parent().find("input:checkbox[name=checkchilden]").removeAttr("checked");
    }else{
    	$(this).parent().find("input:checkbox[name=checkchilden]").attr("checked",":checked")
    }
 })

//弹出模式框
$('.clickName').live('click',function(){
    getPagExamSub()
    $('#modal-overlay').css('visibility', 'visible')
    $('.modal-data').css('visibility', 'visible')
    //$('input:checkbox').removeAttr('checked');
    $('.page').show();
    _this = $(this).parent().parent();

})

//双击确定
 $(document).on('dblclick','.xysj td',function(){
	 var spCodesTemp = $(this).parent().find("input:checkbox[name=student]").val();      
     var lcsjids=$(this).parent().find("input:checkbox[name=student]").next().val()//练车时间id    
   	if(spCodesTemp == null || lcsjids == null ){
	   return false;
  	}
 	   $.ajax({
           url: '<%=path%>/DrivingSys/selSubjectThreeRegentryBysutid',
           type: "post",
           async: true,
           data: {'id': spCodesTemp,'lcsjids':lcsjids},
           dataType: "json",
           success: function (res) {
        	   addStudentMesg(res)	
           },
           error: function () {
               alert('Error');
           }
 	}) 
 })
 
    //把选中的信息名称填充到输入框中
    $('.subtn').click(function () {
        var spCodesTemp = "";      
        $('input:checkbox[name=student]:checked').each(function (i) {
            if (0 == i) {
                //把学生id增加到字表中
                spCodesTemp = $(this).val();

            } else {
                spCodesTemp += ("," + $(this).val());

            }
        });
        var lcsjids=""//练车时间id    
        $('input:checkbox[name=student]:checked').next().each(function (j){       	
        	if(j == 0){
        		lcsjids=$(this).val();
        	}else{
        		lcsjids+=(","+$(this).val());
        	}
        });
        //alert(spCodesTemp+" "+lcsjids)
        if(spCodesTemp == ''){
	        alert("请选择一条数据")
	        return false
	    }
        $.ajax({
            url: '<%=path%>/DrivingSys/selSubjectThreeRegentryBysutid',
            type: "post",
            data: {'id': spCodesTemp,'lcsjids':lcsjids},
            dataType: "json",
            success: function (res) {
                //alert("修改:"+_this);
                addStudentMesg(res);
            },
            error: function () {
                alert('Error');
            }
        });

    });
    
    //把查找到学员信息填充进去
    function addStudentMesg(res){
        if(res == -1){
            alert("需要的学员中出现与科目三分车数据不匹配!");
            return false;
        }
        //alert(res[0].cfstudentid)
        var students = "";
        var count =0;//计数
        for(var j=0;j<res.length;j++){
            $(".subfid").each(function(i) {
                //alert($(this).val()+"   "+res[j].cfstudentid)
                if ($(this).val() == res[j].cfstudentid) {
                    var name = $(this).parent().parent().find("td input[name=subfnameL2]").val();
                    if (count == 0) {
                        students = name;
                    } else {
                        students += "," + name;
                    }
                    count++;
                }
            })
        }
        if(students != ''){
            alert(students+" 已经在列表中,请重新选择学员!")
            return false;
        }
    	for (var i = 0; i < res.length; i++) {               	
        	if(res[i].cfbjgsj != null && res[i].cfbjgsj !=''){
        		var date1 = stringToTime(res[i].cfbjgsj);//科目二不及格时间
        		var date2 = new Date().getTime();//系统当前时间               		
        		var day = dateDiff(date1, date2)
        		day = parseInt(day)//去掉小数点取整天数
        		res[i].cfscts=day;//距离不及格考试天数               		
        	}
			if(res[i].cfchexing == '伊兰特BH7162MY'){
				yltcar+=1;
			}else{
				stncar+=1;
			}
			//优惠金额
			if(res[i].cfyhje == null){
				res[i].cfyhje = 0;
			}
			//考试次数
			if(res[i].cfkscs == null){
				res[i].cfkscs = 0;
			}
			//交补考费次数
			if(res[i].cfbkfcs == null){
				res[i].cfbkfcs = 0;
			}
			//交补考费金额
			if(res[i].cfbkfze == null){
				res[i].cfbkfze = 0;
			}
		} 
        var htmlhead1 = $('#table1').html();

        if(_this == null){
            $('#table1').html(htmlhead1+myTemplate2(res));
            $("#cfzbsylt").val(yltcar);
            $("#cfbimudf0001").val(stncar);
            sum+=res.length;
            $("#cfzzbs").val(sum);
            $("#cfzbks").val(sum);
        }else{
            //alert("修改")
            _this.find("input:hidden[name=subfid]").val(res[0].cfstudentid);
            _this.find("input:hidden[name=subcfclazzid]").val(res[0].cfclazzid);
            _this.find("input:text[name=subcfzkzmbh]").val(res[0].cfzkzmbh);
            _this.find("input:text[name=subfnameL2]").val(res[0].studentName);
            _this.find("input:text[name=substufnumber]").val(res[0].cfstudentno);
            _this.find("input:text[name=subcfidcardno]").val(res[0].cfidcardno);
            if(res[0].cfsex == 1){
                res[0].cfsex = '男';
            }else{
                res[0].cfsex = '女';
            }
            _this.find("input:text[name=subcfsex]").val(res[0].cfsex);
            _this.find("input:text[name=subcfsjhm]").val(res[0].cfmobile);
            _this.find("input:text[name=subcflxdh]").val(res[0].cfphone);
            _this.find("input:text[name=subcftjrName]").val(res[0].cfjsr);
            _this.find("input:text[name=cfsqzjcxdh]").val(res[0].cfsqzjcxdh);
            _this.find("input:text[name=subjlname]").val(res[0].jlzname);
            _this.find("input:hidden[name=subcfjiaolianid]").val(res[0].cfjiaolianid);
            _this.find("input:text[name=subcfchexing]").val(res[0].cfchexing);
            _this.find("input:hidden[name=subcfchepaihao]").val(res[0].cfchepaihao);
            if(res[0].cflocal == 1){
                res[0].cflocal = '本地';
            }else if(res[0].cflocal == 2){
                res[0].cflocal = '异地';
            }else{
                res[0].cflocal = '学生';
            }
            _this.find("input:text[name=subcflocal]").val(res[0].cflocal);
            //考试次数
            if(res[0].cfkscs == null){
                res[0].cfkscs =0;
            }
            _this.find("input:text[name=subcfkscs]").val(res[0].cfkscs);
            if(res[0].cfkscs == 0){
                res[0].cfkscs = '初考';
            }else if(res[0].cfkscs == null){
                res[0].cfkscs = '初考';
            }else{
                res[0].cfkscs = '补考';
            }
            _this.find("input:text[name=subcfckbk]").val(res[0].cfckbk);
            //交补考费次数
            if(res[0].cfbkfcs == null){
                res[0].cfbkfcs = 0;
            }
            //交补考费金额
            if(res[0].cfbkfze == null){
                res[0].cfbkfze = 0;
            }
            _this.find("input:text[name=subcfbkfcs]").val(res[0].cfbkfcs);
            _this.find("input:text[name=subcfbkfze]").val(res[0].cfbkfze);
            if(res[0].cfbxwx == 1){
                res[0].cfbxwx = '本校';
            }else{
                res[0].cfbxwx = '外校';
            }
            _this.find("input:text[name=subcfbxwx]").val(res[0].cfbxwx);
            _this.find("input:text[name=subcfkmyjgsj]").val(res[0].cfkmyjgsj);
            _this.find("input:text[name=subcfbjgsj]").val(res[0].cfbjgsj);
            if(res[0].cfbjgsj != null && res[0].cfbjgsj !=''){
                var date1 = stringToTime(res[0].cfbjgsj);//科目三不及格时间
                var date2 = new Date().getTime();//系统当前时间
                var day = dateDiff(date1, date2);
                day = parseInt(day);//去掉小数点取整天数
                res[0].cfscts=day;//距离不及格考试天数
            }
            if(res[0].cfbjgsj == null){
                res[0].cfbjgsj = '';
            }
            _this.find("input:text[name=subcfscts]").val(res[0].cfscts);
            _this.find("input:text[name=subcfclazz]").val(res[0].cfclazz);
            _this.find("input:text[name=subcfysje]").val(res[0].cfysje);
            //优惠金额
            if(res[0].cfyhje == null){
                res[0].cfyhje = 0;
            }
            _this.find("input:text[name=subcfyhje]").val(res[0].cfyhje);
            _this.find("input:text[name=subcfyisje]").val(res[0].cfyisje);
            _this.find("input:text[name=subcfqfje]").val(res[0].cfqfje);
            _this.find("input:text[name=subcfremark]").val(res[0].cfremark);
            if(res[0].cfdajj == 0 || res[0].cfdajj == null){
                _this.find("input:checkbox[name=subcfdajj]").removeAttr('checked');
            }else{
                _this.find("input:checkbox[name=subcfdajj]").attr('checked');
                _this.find("input:checkbox[name=subcfdajj]").prop("disabled",true);
            }
            if(res[0].cfjnbjj == 0 || res[0].cfjnbjj == null){
                _this.find("input:checkbox[name=subcfjnbjj]").removeAttr('checked');
            }else{
                _this.find("input:checkbox[name=subcfjnbjj]").attr('checked');
                _this.find("input:checkbox[name=subcfjnbjj]").prop("disabled",true);
            }
            _this = null;
        }
    	var i=1;
    	$("input:text[name=subfseq]").each(function (j){ 		
        	$(this).val(i);                	
        	i++
        })
        $('#modal-overlay').css('visibility', 'hidden');
        $('.modal-data').css('visibility', 'hidden')
        _this=null;//清空 _this
    }
    
     //添加预约科目三的学员
    $('.addSubscribeStudent').click(function () {
    	var examdate=$("#ywrq").val().trim();//考试日期
    	var carType=$(".cfcartype").val();//车型    	
    	if(examdate == null || examdate == ''){
    		alert("考试日期不能为空！")
    		$("#ywrq").focus()
    	}else{
    	    //添加学员
    	    selExamsubscribeThreeByExamdateAndCarType(examdate,carType)
    	}
        

    });
    //根据考试日期和驾照类型查找学员
    function selExamsubscribeThreeByExamdateAndCarType(examdate,carType){
    	//添加数据
		$.ajax({
            url: '<%=path%>/DrivingSys/selExamsubscribeThreeByExamdateAndCarType',
            type: "post",
            data: {'examdate': examdate,'carType':carType},
            dataType: "json",
            success: function (res) {
            	if(res == null || res ==''){
            		alert("抱歉，"+examdate+"没有预约科目三"+carType+"的学员！")
            	}else{                                    
            		//addStudentMesg(res)
                    if(res == -1){
                        alert("需要添加的学员中出现与科目三分车数据不匹配!");
                        return false;
                    }
                    var students = "";
                    var count =0;//计数
                    var item = new Array();//记录重复学员对象的下标
                    for(var j=0;j<res.length;j++){
                        $(".subfid").each(function(i) {
                            if ($(this).val() == res[j].cfstudentid) {
                                item.push(j)
                                var name = $(this).parent().parent().find("td input[name=subfnameL2]").val();
                                if (count == 0) {
                                    students = name;
                                } else {
                                    students += "," + name;
                                }
                                count++;
                            }
                        })
                    }
                    if(students != ''){
                        for (var k = 0;k<item.length;k++){
                            delete (res[item[k]]);//删除重复的学员对象
                        }
                        alert(students+" 已经在列表中!")
                        //return false;
                    }
                    for (var i = 0; i < res.length; i++) {
                        if(item.length == 0){
                            if(res[i].cfbjgsj != null && res[i].cfbjgsj !=''){
                                var date1 = stringToTime(res[i].cfbjgsj);//科目二不及格时间
                                var date2 = new Date().getTime();//系统当前时间
                                var day = dateDiff(date1, date2)
                                day = parseInt(day)//去掉小数点取整天数
                                res[i].cfscts=day;//距离不及格考试天数
                            }
                            if(res[i].cfchexing == '伊兰特BH7162MY'){
                                yltcar+=1;
                            }else{
                                stncar+=1;
                            }
                            //优惠金额
                            if(res[i].cfyhje == null){
                                res[i].cfyhje = 0;
                            }
                            //考试次数
                            if(res[i].cfkscs == null){
                                res[i].cfkscs = 0;
                            }
                            //交补考费次数
                            if(res[i].cfbkfcs == null){
                                res[i].cfbkfcs = 0;
                            }
                            //交补考费金额
                            if(res[i].cfbkfze == null){
                                res[i].cfbkfze = 0;
                            }
                        }else{
                            for (var j =0; j<item.length;j++){
                                if(i != item[j]){
                                    if(res[i].cfbjgsj != null && res[i].cfbjgsj !=''){
                                        var date1 = stringToTime(res[i].cfbjgsj);//科目二不及格时间
                                        var date2 = new Date().getTime();//系统当前时间
                                        var day = dateDiff(date1, date2)
                                        day = parseInt(day)//去掉小数点取整天数
                                        res[i].cfscts=day;//距离不及格考试天数
                                    }
                                    if(res[i].cfchexing == '伊兰特BH7162MY'){
                                        yltcar+=1;
                                    }else{
                                        stncar+=1;
                                    }
                                    //优惠金额
                                    if(res[i].cfyhje == null){
                                        res[i].cfyhje = 0;
                                    }
                                    //考试次数
                                    if(res[i].cfkscs == null){
                                        res[i].cfkscs = 0;
                                    }
                                    //交补考费次数
                                    if(res[i].cfbkfcs == null){
                                        res[i].cfbkfcs = 0;
                                    }
                                    //交补考费金额
                                    if(res[i].cfbkfze == null){
                                        res[i].cfbkfze = 0;
                                    }
                                }
                            }
                        }
                    }
                    $("#cfzbsylt").val(yltcar)
                    $("#cfbimudf0001").val(stncar)
                    sum+=res.length-item.length
                    $("#cfzzbs").val(sum)
                    $("#cfzbks").val(sum)
                    var htmlhead1 = $('#table1').html();
                    $('#table1').html(htmlhead1+myTemplate2(res));
                    //处理序号
                    var i=1;
                    $("input:text[name=subfseq]").each(function (j){
                        $(this).val(i);
                        i++
                    })
            	}
            },
            error: function () {
                alert('Error');
            }
        });
    }
    
    //计算两个日期之前相差的天数
    function dateDiff(date1, date2){       
        var type1 = typeof date1, type2 = typeof date2;       
        if(type1 == 'string')       
            date1 = stringToTime(date1);       
        else if(date1.getTime)       
            date1 = date1.getTime();       
        if(type2 == 'string')       
            date2 = stringToTime(date2);       
        else if(date2.getTime)       
            date2 = date2.getTime();   
        return ((date2 - date1) / 1000 / 60 / 60 / 24);/* //除1000是毫秒，不加是秒   */ 
    }  
    
    //字符串转成Time(dateDiff)所需方法   
    function stringToTime(string){       
        var f = string.split(' ', 2);       
        var d = (f[0] ? f[0] : '').split('-', 3);       
        var t = (f[1] ? f[1] : '').split(':', 3);       
        return (new Date(       
        parseInt(d[0], 10) || null,       
        (parseInt(d[1], 10) || 1)-1,       
        parseInt(d[2], 10) || null,       
        parseInt(t[0], 10) || null,      
        parseInt(t[1], 10) || null,       
        parseInt(t[2], 10) || null)).getTime();   
    }    
  	//返回
    function back() {
        parent.closeSelectCard()

//        location = '<%=path%>/DrivingSys/querySubjectThreeReg/look.action';
    }
  	//改变审核状态
    function audit(num) {
        var fid = $("input:hidden[name=fid]").val();
        var fnumber =$("input:text[name=fnumber]").val();
        if(fid == null || fnumber == null){
            return false;
        }
        if(num == 3) {//反审核
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data10').css('visibility', 'visible')
            var activitiState=$('.activitiState').val();
            $("#againstAuditsubmit").click(function () {
                var againstAuditcomment = $("#againstAuditcomment").val();
                if (againstAuditcomment == null || againstAuditcomment == '') {
                    againstAuditcomment = "不同意";
                }
                $.ajax({
                    url: '<%=path%>/DrivingSys/againstCheckSubjectThreeRegActiviti',
                    type: 'post',
                    data: {'fid': fid, 'fnumber':fnumber,'againstAuditcomment': againstAuditcomment,'activitiState':activitiState},
                    dataType: 'json',
                    success: function (result) {
                        if (result["result"] == 'success') {
                            showAlert("反审核成功!","querySubjectThreeReg/look.action")
                            /*alert("反审核成功!")
                            setTimeout(function () {
                                location = "<%=path%>/DrivingSys/querySubjectThreeReg/look.action";
                            }, 1000);*/

                        } else {
                            alert("反审核失败!")
                        }
                    },
                    error: function () {
                        alert('Error')
                    }
                })
            })
        }

        if(num == 4){//提交
            $.messager.confirm('提示', '是否提交?', function (r) {
                if(r){
                    $.ajax({
                        url:'<%=path%>/DrivingSys/submitSubjectThreeRegActiviti',
                        type:'post',
                        data:{'fid':fid,'fnumber':fnumber},
                        dataType: 'json',
                        success:function(result){
                            if(result["result"] == 'success'){
                                showAlert("提交成功!","querySubjectThreeReg/look.action")
                               /* alert("提交成功!")
                                setTimeout(function () {
                                    location = "<%=path%>/DrivingSys/querySubjectThreeReg/look.action";
                                }, 1000);*/
                            }else{
                                alert("提交失败!")
                            }
                        },
                        error:function () {alert('Error')}
                    })
                }
            })
        }

        if(num == 5){   //审核
            $('#modal-overlay').css('visibility', 'visible')
            $('.modal-data9').css('visibility', 'visible')
            $("#auditsubmit").click(function() {
                var agree = $("input:radio[name=check]:checked").val();//同意不同意
                var auditcomment = $("#auditcomment").val();
                if (agree == null) {
                    alert("你选择你的意见");
                    return false;
                }
                if (auditcomment == null || auditcomment == '') {
                    if(agree == "1"){
                        auditcomment = "同意";
                    }else{
                        auditcomment = "不同意";
                    }
                }

                $.ajax({
                    url:'<%=path%>/DrivingSys/checkSubjectThreeRegActiviti',
                    type:'post',
                    data:{'fid':fid,'fnumber':fnumber,'agree':agree,'auditcomment':auditcomment},
                    dataType: 'json',
                    // async: true,
                    success:function(result){
                        if(result["result"] == 'success'){
                            showAlert("审核成功!","querySubjectThreeReg/look.action")
                           /* alert("审核成功!")
                            setTimeout(function () {
                                location = "<%=path%>/DrivingSys/querySubjectThreeReg/look.action";
                            }, 1000);*/
                        }else if(result["result"] == 'isNoResponsiblePerson'){
                            alert("当前用户不是要求的经办人!")
                        }else if(result["result"] == 'successAndOver'){
                            showAlert("此流程成功推进，并且此流程已经结束!","querySubjectThreeReg/look.action")
                            /*alert("此流程成功推进，并且此流程已经结束!")
                            setTimeout(function () {
                                location = "<%=path%>/DrivingSys/querySubjectThreeReg/look.action";
                            }, 1000);*/
                        }else{
                            alert("审核失败")
                        }
                    },
                    error:function () {alert('Error')}
                })
            })
        }
    }
function subForm(){
    var count =0;
    $("input:checkbox[name=checkchilden]").each(function(i){
        count ++;
    })
    if(count == 0){
        alert("请先添加学员!")
        return false;
    }
    $("input[type='submit']").attr("disabled", "disabled");
}

//改变业务日期或者车型清空已经增加的学员
var oldTime ="";//记录改变之前的时间
function changeFbizdate(obj) {
    if(oldTime  == '' ){
        oldTime = $("#ywrq").val()
    }
    var k = 0;
    $("input:checkbox[name=checkchilden]").each(function(i){
        k++;
    })
    if(k != 0){
        $.messager.confirm('提示', '考试时间或者车型改变，将清空之前录入的学员数据!', function (r) {
            if (r) {
                $("input:checkbox[name=checkchilden]").each(function (i) {
                    $(this).parent().parent().remove()
                })
                sum = sum - k;
                yltcar -= $("#cfzbsylt").val();//伊兰特车的数量
                stncar -= $("#cfbimudf0001").val();//桑塔纳
                $("#cfzzbs").val(sum)
                $("#cfzbks").val(sum)
                $("#cfzbsylt").val(yltcar)
                $("#cfbimudf0001").val(stncar)
                oldTime = $("#ywrq").val()
            } else {
                $("#ywrq").val(oldTime)
            }
        })
    }else{//把oldTime赋值
        oldTime = $("#ywrq").val()
    }
}
var oldCartype = $(".cfcartype").val();//记录之前的车型
function changeCartype() {
    var k = 0;
    $("input:checkbox[name=checkchilden]").each(function(i){
        k++;
    })
    if(k != 0){
        $.messager.confirm('提示', '考试时间或者车型改变，将清空之前录入的学员数据!', function (r) {
            if (r) {
                $("input:checkbox[name=checkchilden]").each(function (i) {
                    $(this).parent().parent().remove()
                })
                sum = sum - k;
                yltcar -= $("#cfzbsylt").val();//伊兰特车的数量
                stncar -= $("#cfbimudf0001").val();//桑塔纳
                $("#cfzzbs").val(sum)
                $("#cfzbks").val(sum)
                $("#cfzbsylt").val(yltcar)
                $("#cfbimudf0001").val(stncar)
                oldCartype = $(".cfcartype").val()
            } else {
                $(".cfcartype").val(oldCartype)
            }
        })
    }else{//把oldTime赋值
        oldCartype = $(".cfcartype").val()
    }
}
</script>
</html>